<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const o1 = { a: 1, b: 2, list: [1, 2, 3] };
      const o2 = { c: 3, d: 4 };
      const o3 = { e: 10, ...o1, f: 20, ...o2, g: 30 };
      console.log(o3);
      console.log({ ...o1 });
      console.log(JSON.parse(JSON.stringify(o1)));
      // console.log(Object.assign({}, o3, o2, o1));
    </script>
  </body>
</html>
